<?php 
use \kucha\ueditor\UEditor;

// 调用方法	
// echo \kucha\ueditor\UEditor::widget(['name' => 'catname']);

// echo UEditor::widget(['name' => 'catname']);

echo UEditor::widget([
	'name'=>'catname',
    'clientOptions' => [
        //编辑区域大小
        'initialFrameHeight' => '200',
        //设置语言
        'lang' =>'zh-cn', //中文为 zh-cn
        //定制菜单
        'toolbars' => [
        	[ 
        		'undo', 'redo', '|',
        		'bold', 'italic', 'underline', 'strikethrough', 'removeformat', 'formatmatch', 'autotypeset', 'blockquote', 'pasteplain', '|', 
        		'forecolor', 'backcolor', 'insertorderedlist', 'insertunorderedlist', 'selectall',  '|',
        		'rowspacingtop', 'rowspacingbottom', 'lineheight'
        	],
        	[ 
        		'customstyle', 'paragraph', 'fontfamily', 'fontsize', '|',
        		'directionalityltr', 'directionalityrtl', 'indent', '|',
        		'justifyleft', 'justifycenter', 'justifyright', 'justifyjustify', '|',
        		'touppercase', 'tolowercase', '|',
        		'link', 'unlink'
        	],
        	[ 
        		'simpleupload', //单图上传
        		'insertimage', //多图上传
        		'imagenone', 'imageleft', 'imageright', 'imagecenter', '|',
        		'horizontal', 'spechars','|',
        		'inserttable', 'deletetable', 'insertparagraphbeforetable', 'insertrow', 'deleterow', 'insertcol', 'deletecol', 'mergecells', 'mergeright', 'mergedown', 'splittocells', 'splittorows', 'splittocols' 
        	]
        ],
]]);
// var_dump($catmodel->find()->asarray()->all());
 ?>
